<template>
  <u-overlay :show="show" @click="show = false">
    <view class="warp">
      <template v-if="type == 1">
        <view class="rect" @tap.stop>
          <u-image src="https://kaixintaomall.oss-cn-guangzhou.aliyuncs.com/file/abg.png" height="712rpx"
            :lazy-load="true" width="571rpx"></u-image>
          <view class="bg_">
            <view class="bold title">审核成功！发完699福袋即可免单</view>
            <view class="phone">
              <u-image src="https://kaixintaomall.oss-cn-guangzhou.aliyuncs.com/file/abg.png" height="196rpx"
                :lazy-load="true" width="196rpx"></u-image>
            </view>
            <view class="btn_list">
              <button class="home_btn" @click="show = false">知道了</button>
              <button class="home_btn list">
                <view class="img">
                  <u-image src="@/static/tabs/wechat.png" height="28rpx" :lazy-load="true" width="34rpx"></u-image>
                </view>
                去发福袋
              </button>
            </view>
          </view>
        </view>
      </template>
      <template v-else-if="type == 2">
        <view class="btnClick">
          <u-image src="https://kaixintaomall.oss-cn-guangzhou.aliyuncs.com/file/package.png" height="709rpx"
            :lazy-load="true" width="746rpx"></u-image>
          <view class="onBtn" @click.stop="sublimeBtn"></view>
        </view>
      </template>
      <template v-else-if="type == 3">
        <view class="sublist">
          <view class="marTop">
            <u-image src="https://kaixintaomall.oss-cn-guangzhou.aliyuncs.com/file/luckyget.png" height="260rpx"
              :lazy-load="true" width="500rpx"></u-image>
          </view>
          <view class="subConter">
            <view class="bold ">吸尘器</view>
            <view class="subConterPhone">
              <u-image src="https://kaixintaomall.oss-cn-guangzhou.aliyuncs.com/file/happypeach.png" height="196rpx"
                :lazy-load="true" width="196rpx"></u-image>
            </view>
            <button class="home_btn list_" @click.stop="subLimearea">开心收下</button>
            <view class="hui">无需支付，包邮到家</view>
          </view>
        </view>
      </template>
    </view>
  </u-overlay>
</template>
<script setup lang="ts">
import { ref, toRefs } from 'vue'
export interface Props {
  type?: string | number
}
const props = withDefaults(defineProps<Props>(), {
  type: 2
})
const { type } = toRefs(props)
const show = ref<boolean>(true)
const emit = defineEmits({})
function sublimeBtn() {
  emit('type', 3)
}
function subLimearea() {
  uni.navigateTo({
    url: "../../subPage/addarea/addarea",
  });
}
</script>
<style lang="scss" scoped>
@import './BModal.scss';
</style>